﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectEdit.aspx.cs" Inherits="Demo.Web.Catalogs.ProjectEdit" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<%@ Register Src="ProjectTecnology.ascx" TagName="WindowTecnology" TagPrefix="uc1" %>
<%@ Register Src="ProjectArea.ascx" TagName="WindowArea" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="../../Resources/css/styles.css" rel="stylesheet" type="text/css" />
    <title></title>
    <style type="text/css">
        .label
        {
            font: bold 11px tahoma,arial,sans-serif;
            width: 180px;
            height: 25px;
            padding: 5px 0;
            border: 1px dotted #99bbe8;
            color: #15428b;
            cursor: default;
            margin: 10px;
            background: #dfe8f6;
            text-align: center;
            margin-left: 0px;
        }
        .cbStates-list
        {
            width: 99%;
            font: 11px tahoma,arial,helvetica,sans-serif;
        }
        
        .cbStates-list th
        {
            font-weight: bold;
        }
        
        .cbStates-list td, .cbStates-list th
        {
            padding: 3px;
        }
        
        .list-item
        {
            cursor: pointer;
        }
    </style>
    <script type="text/javascript">
        var Clear = function () {
            var name = Ext.getCmp('txtName');
            name.setValue('');
            name.clearInvalid();
            var name = Ext.getCmp('txtDateStart');
            name.setValue('');
            name.clearInvalid();
            var name = Ext.getCmp('txtDateEnd');
            name.setValue('');
            name.clearInvalid();
            var name = Ext.getCmp('txtHours');
            name.setValue('');
            name.clearInvalid();
            var name = Ext.getCmp('cboStatus');
            name.setValue('');
            name.clearInvalid();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Border="false" DeferredRender="false"
        Layout="FitLayout">
        <Items>
            <ext:FormPanel ID="ProjectInfo" runat="server" Title="Informacion de Proyecto" Icon="ChartOrganisation"
                DefaultAnchor="100%" BodyPadding="5">
                <Items>
                    <ext:TextField ID="txtProjectId" Visible="false" runat="server" FieldLabel="ID" Disabled="true"
                        Name="ID" />
                    <ext:TextField ID="txtName" runat="server" FieldLabel="Nombre" MaxLength="200" IsRemoteValidation="true"
                        BlankText="Nombre es Requerido" AllowBlank="false">
                        <RemoteValidation OnValidation="CheckName" />
                    </ext:TextField>
                    <ext:DateField ID="txtDateStart" runat="server" FieldLabel="Fecha Inicio" BlankText="Fecha Inicio es Requerida"
                        AllowBlank="false" />
                    <ext:DateField ID="txtDateEnd" runat="server" FieldLabel="Fecha Fin" BlankText="Fecha Fin es Requerida"
                        AllowBlank="false" />
                    <ext:NumberField ID="txtHours" runat="server" FieldLabel="Horas" MaxLength="6" BlankText="Total Horas es Requerido"
                        AllowBlank="false" />
                    <ext:ComboBox ID="cboStatus" EmptyText="Seleccione" runat="server" FieldLabel="Estatus"
                        BlankText="Estatus es Requerido" AllowBlank="false">
                        <Items>
                            <ext:ListItem Value="1" Text="En Proceso">
                            </ext:ListItem>
                            <ext:ListItem Value="2" Text="Suspendido">
                            </ext:ListItem>
                            <ext:ListItem Value="3" Text="Cerrado">
                            </ext:ListItem>
                            <ext:ListItem Value="4" Text="En Espera">
                            </ext:ListItem>
                        </Items>
                    </ext:ComboBox>
                </Items>
                <Listeners>
                    <ValidityChange Handler="#{btnGuardar}.setDisabled(!valid);" />
                </Listeners>
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <LayoutConfig>
                            <ext:HBoxLayoutConfig Align="top" Pack="Start" />
                        </LayoutConfig>
                        <Items>
                            <ext:Button ID="btnAssignArea" runat="server" Text="Asignar Areas" Icon="Add">
                                <DirectEvents>
                                    <Click OnEvent="AssignArea">
                                        <EventMask ShowMask="true" />
                                    </Click>
                                </DirectEvents>
                            </ext:Button>
                            <ext:ToolbarSeparator runat="server"/>
                            <ext:Button ID="btnAssingTecnologies" runat="server" Text="Asignar Tecnologias" Icon="Add">
                                <DirectEvents>
                                    <Click OnEvent="AssigTecnologies">
                                        <EventMask ShowMask="true" />
                                    </Click>
                                </DirectEvents>
                            </ext:Button>
                            <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server"/>
                            <ext:Button ID="CancelButton" runat="server" Text="Limpiar" Icon="Decline">
                                <Listeners>
                                    <Click Fn="Clear" />
                                </Listeners>
                            </ext:Button>
                            <ext:ToolbarSeparator ID="ToolbarSeparator2" runat="server"/>
                            <ext:Button ID="btnGuardar" runat="server" Text="Guardar" Icon="Accept" Disabled="true">
                                <DirectEvents>
                                    <Click OnEvent="Guardar">
                                        <EventMask ShowMask="true" />
                                    </Click>
                                </DirectEvents>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
            </ext:FormPanel>
        </Items>
    </ext:TabPanel>
    <uc1:WindowTecnology ID="WindowTecnology" runat="server" />
    <uc2:WindowArea ID="WindowArea" runat="server" />
    </form>
</body>
</html>
